home *** CD-ROM | disk | FTP | other *** search
- /*
- File: StorPriv.h
-
- Contains: Private Definition for XMPStorageSystem
-
- Owned by: Vincent Lo
-
- Copyright: © 1992 - 1996 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <2> 3/15/96 DM 1295410: create list iterators on stack
- (avoid mem thrash during purge)
- <6> 5/25/95 jpa List.h --> LinkList.h [1253324]
- <5> 4/15/95 VL 1240014: ContainerList::Add gets the real
- ID from container instead of through a
- parameter.
- <4> 9/23/94 VL 1184272: ContainerID is now a sequence of
- octets.
- <3> 6/20/94 CC ODMemoryHeap* changed to ODMemoryHeapID.
- <2> 6/15/94 CC ODHeap -> ODMemoryHeap.
- <1> 6/1/94 VL first checked in
-
- To Do:
- In Progress:
- */
-
- #ifndef _STORPRIV_
- #define _STORPRIV_
-
- #ifndef _PLFMDEF_
- #include "PlfmDef.h"
- #endif
-
- #ifndef _ODMEMORY_
- #include "ODMemory.h"
- #endif
-
- #ifndef _LINKLIST_
- #include "LinkList.h"
- #endif
-
- #ifndef _BARRAY_
- #include <BArray.h>
- #endif
-
- #ifndef SOM_ODContainer_xh
- #include "ODCtr.xh"
- #endif
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
-
- class ContainerLink;
- class ContainerList;
- class ContainerListIterator;
-
- //==============================================================================
- // ContainerLink
- //==============================================================================
-
- class ContainerLink : public Link {
-
- public:
-
- ContainerLink(ODContainer* container)
- {
- fContainer = container;
- }
- ~ContainerLink() {};
-
- ODContainer* fContainer;
- };
-
- //==============================================================================
- // ContainerList
- //==============================================================================
-
- class ContainerList
- {
-
- public:
-
- ContainerList();
-
- ODVMethod ~ContainerList();
-
- ODMethod void Initialize();
-
- ODMethod void Add(ODContainer* container);
-
- ODMethod void Remove(ODContainerID* containerID);
-
- ODMethod ODContainer* Get(ODContainerID* containerID);
-
- private:
-
- ODMethod ContainerLink* GetLink(ODContainerID* containerID);
-
- LinkedList* fLinkedList;
- ODMemoryHeapID fHeap;
-
- public: // private by convention
-
- ODMethod ODMemoryHeapID GetHeap();
- ODMethod LinkedList* GetLinkedList();
- };
-
- //==============================================================================
- // ContainerListIterator
- //==============================================================================
-
- class ContainerListIterator
- {
-
- public:
-
- ContainerListIterator(ContainerList* containerList);
-
- ODVMethod ~ContainerListIterator();
-
- ODMethod void Initialize();
- ODMethod ODContainer* Last();
- ODMethod ODContainer* Previous();
- ODMethod ODBoolean IsNotComplete();
-
- private:
-
- LinkedListIterator fIterator;
- ContainerList* fContainerList;
- };
-
- #endif // _STORPRIV_